package com.xbenmh.order.autoBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.core.env.Environment;

/**
 * @Author: xben
 * @Date: 2018/12/5 11:14
 */
@Configuration
@PropertySource("classpath:application.properties")
public class ExpressiveConfig {
    @Autowired
    Environment env;
    @Bean(name = "staff01")
    public Staff disc(){
        return new Staff(
                env.getProperty("disc.title","ssssssssssss"),
                env.getProperty("disc.artist",Integer.class,123123)
        );
    }
}
